package lab7.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HelloWorldController {

  @RequestMapping("/hello")
  protected ModelAndView hello() {
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("helloWorld"); // logical name of the view
    modelAndView.addObject("message", "Hello world!"); // add some data
    return modelAndView;
  }

}
